#include <func.h>

void* func(void *p)
{
    char* str =(char*) malloc(sizeof(char)*10);
    strcpy((char *)str,"hello");
    pthread_exit(str);
}


int main(int argc,char **argv)
{
    pthread_t pthid;
    pthread_create(&pthid,NULL,func,NULL);
    
    char *str;
    pthread_join(pthid,(void**)&str);
    printf("this is main,str:%s\n",str);
    free(str);
    return 0;
}

